<extend name="Public/base" />
<block name="content">
    <div class="row" style="margin-top:5%;margin-bottom: 5%;margin-left: 15%">
        <div class="medium-3 columns">
            <input type="text" id="className" style="height:33px" placeholder="请输入学生班级">
        </div>
        <div class="medium-3 columns">
            <input type="text" id="studentName" style="height:33px" placeholder="请输入学生姓名">
        </div>
        <div>
            <buttom class="button tiny  radius" onclick="cx()">查询</buttom>
        </div>
    </div>
    <div id="fietwo"></div>
    <script>
        function cx() {
            var data={
                class:$('#className').val(),
                sname:$('#studentName').val(),
            };
            $.post('<{:U("D/FieldShow/getStu")}>',data,function (data) {
                    var html='<table>';
                for(i in data){
                    html+='<tr>'
                            +'<td>'+data[i].student_id+'</td>'
                            +'<td>'+data[i].sname+'</td>'
                            +'<td>'+data[i].class+'</td><td>';
                    for(j in data[i]['field']){
                        html+='<a href="javascript:void(0)">'+data[i]['field'][j]['ftime']+'</a>';
                    }
                    html+='</td></tr>';
                }
                html+='</table>';
                $('#fietwo').html(html);
            });
        }
    </script>
</block>